
// 3.使用基于表达式的泛型声明

enum Transportations {
    motorcycle,
    car,
    truck
}

interface T<T extends Transportations> {
    type: T
}

type T1 = T<Transportations.motorcycle> & {
    make: number
}

type T2 = T<Transportations.car> & {
    pow: number
}

type T3 = T<Transportations.truck> & {
    capacity: number
}

